﻿using NFine.Data;
using NFine.Domain._03_Entity.InformationCenter;
using NFine.Domain._04_IRepository.InformationCenter;

namespace NFine.Repository.InformationCenter
{
    public class SysNewsRepository : RepositoryBase<SysNewsEntity>, ISysNewsRepository
    {
        public int DeleteNews(string keyValues)
        {
            try
            {
                //开启事务
                using (var db = new RepositoryBase().BeginTrans())
                {
                    db.Delete<SysNewsEntity>(t => keyValues.Contains(t.F_Id));
                    return db.Commit();
                }
            }
            catch
            {
                return 0;
            }
        }
    }
}